package com.ququ.syb.business.transfer.controller;

import com.ququ.common.result.Result;
import com.ququ.syb.business.transfer.service.TransferBusinessSevice;
import com.ququ.syb.common.pojo.TransferOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TransferBusinessController {
    @Autowired
    private TransferBusinessSevice transferBusinessSevice;

    @RequestMapping("/transfer")
    public Result<TransferOrder> transferBusiness(@RequestParam String outorderno,
                                                  @RequestParam String fromaccount,
                                                  @RequestParam String frompaychannelid,
                                                  @RequestParam String toaccount,
                                                  @RequestParam String topaychannelid,
                                                  @RequestParam Long amount,
                                                  @RequestParam(defaultValue = "1") Integer type,
                                                  @RequestParam String appcode){
        return transferBusinessSevice.transferBusiness(outorderno, fromaccount, frompaychannelid, toaccount, topaychannelid, amount, type, appcode);
    }

}
